package com.nowcoder.community.community;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;

// SpringBoot项目启动入口类
@SpringBootApplication // Spring Boot核心注解，主要用于开启spring自动配置
public class CommunityApplication {

	@PostConstruct
	public void init() {
		// 解决netty启动冲突的问题
		// 在Netty4Utils.setAvailableProcessors()
		System.setProperty("es.set.netty.runtime.available.processors", "false");
	}

	public static void main(String[] args) {
		SpringApplication.run(CommunityApplication.class, args);
	}

}
